package org.tea.inventory.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.tea.inventory.base.validation.groups.CreateGroup;
import org.tea.inventory.base.validation.groups.UpdateGroup;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 节日表
 */
@ApiModel(value = "org-alumni-record-mall-domain-MallFestival")
@Data
@NoArgsConstructor
public class MallFestivalDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "")
    @NotNull(message = "id不能为空", groups = {UpdateGroup.class})
    private Long id;
    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @NotBlank(message = "标题不能为空", groups = {CreateGroup.class, UpdateGroup.class})
    private String title;
    /**
     * 积分
     */
    @ApiModelProperty(value = "积分")
    @NotNull(message = "积分不能为空", groups = {CreateGroup.class, UpdateGroup.class})
    private Long integral;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;
    /**
     * 状态 -1:删除, 0:进行中, 1:已结束
     */
    @ApiModelProperty(value = "状态 -1:删除, 0:进行中, 1:已结束")
    private Integer status;
}